<!DOCTYPE html>
<html>

<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
	<title>sss</title>
	<script src="js/mui.min.js"></script>
	<link href="css/mui.min.css" rel="stylesheet" />
	<script src="js/md5.js"></script>
	<script type="text/javascript" charset="utf-8">
		
		mui.init();
		function singy (data) {
			
			let str = "";
			for (let i in data) {
				str += i + ":" + data[i];
			}
			str=str.toString();
			return hex_md5(str);
		}

	
`	
		var data = {
			/* 
			user:用户的ID
			*/
			user:123
		};

		mui.ajax('http://localhost:3000/wallet/get_my_wallet', {
			data: data,
			type: 'post', //HTTP请求类型
			headers: {
				'Content-Type': 'application/json',
				'singy': singy(data)
			},
			success: function (data) {
				//获得服务器响应
				console.log(data);
			}
		});
`
		//⬆查询余额

		//⬇申请充值
		var data = {
			/* 
			user:用户的ID
			*/
			user:123,
			account:5.00
		};

		mui.ajax('http://localhost:3000/wallet/recharge', {
			data: data,
			type: 'post', //HTTP请求类型
			headers: {
				'Content-Type': 'application/json',
				'singy': singy(data)
			},
			success: function (data) {
				//获得服务器响应
				console.log(data);
			}
		});
	</script>
</head>

<body>

</body>

</html>